package com.parenting.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.parenting.entities.ParentingRuleDO;
import com.parenting.mapper.ParentingRuleMapper;
import com.parenting.request.platform.SaveOrUpdateRule;
import com.parenting.service.ParentingRuleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 规则设置  服务实现类
 * </p>
 *
 * @author 烟台业达-王世玺
 * @since 2021-10-18
 */
@Service
public class ParentingRuleServiceImpl extends ServiceImpl<ParentingRuleMapper, ParentingRuleDO> implements ParentingRuleService {


    @Override
    public void saveOrUpdateRule(SaveOrUpdateRule rule) {
        ParentingRuleDO parentingRuleDO = BeanUtil.copyProperties(rule, ParentingRuleDO.class);


        this.saveOrUpdate(parentingRuleDO);
    }
}
